package com.ruoyi.rsikManage.service;

import com.ruoyi.rsikManage.domain.CoalMine;
import com.ruoyi.rsikManage.domain.MonitorPoint;
import com.ruoyi.rsikManage.domain.VideoResourceTreeNode;
import com.ruoyi.rsikManage.domain.vo.*;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
@Service
public interface MonitorPointService {
    List<MonitorPoint> selectMonitorPointsInPlace(Long placeId);

    List<MonitorPoint> selectMonitorsDetail(MonitorPoint monitorPoint, VideoResourceTreeNode treeNode);

    List<MonitorPoint> selectMonitorsDetailForUnitCodes(MonitorPoint monitorPoint);

    MonitorPoint selectMonitorByApeId(String apeId);
    List<MonitorPoint> selectAllMonitorPoints();
    List<MonitorPoint> selectAllMonitorPointsGroup(Long unitCode);

    List<MonitorPoint> selectMonitorPoints(String monitorName);
    List<MonitorPointDiagnosisResultVo> selectMonitorsDiagnosisResult(String treeType, Integer resourceTreeNodeId, String diagnosisResult, Date diagnosisStartTime, Date diagnosisEndTime,String monitorPointName);
    List<CoalMine> selectCoalMinesWithMonitors(String monitorName);

    List<CoalMine> selectCoalMinesWithMonitorsForUnitCodes(Long unitCode,String monitorName,String isOnline,List<Long> unitCodes);

    List<HistogramVo> selectCameraTypeWithMonitorNumber();
    List<HistogramVo> selectCameraTypeWithMonitorNumberForUnitCodes(List<Long> unitCodes);

    HashMap<String, MonitorPoint> selectMonitorMapByList(List<String> monitorIdList);

    HashMap<String, Integer> selectTotalMonitorCountAndOnlineMonitorCount();


    HashMap<String, Integer> selectMonitorStatusCount(Long unitCode,List<Long> unitCods);

    HashMap<String, Integer> selectTotalMonitorCountAndOnlineMonitorCountForUnitCodes(List<String> apeIds,List<Long> unitCods);

    RatioVo countOnlineRate();

    RatioVo countOnlineRateForUnitCodes(List<Long> unitCodes);


    int mergeMonitorListToMonitorTable(List<MonitorPoint> monitorPointList);

    int updateMonitorStatus(MonitorPoint monitor);
    int deleteTheTreeNodeAndAllMonitorsRel(Integer nodeId);
    int delMonitorAndTreeNodeRelInTheTreeType(String monitorId, String treeType);
    void deleteMonitorNotInList(List<MonitorPoint> list);

    Integer selectOfflineTimeOutMinutes();
    MonitorsOfflineAlarmSettings selectMonitorOfflineAlarmSettings();
    int updateMonitorOfflineAlarmSettings(MonitorsOfflineAlarmSettings monitorOfflineAlarmSettings);

    List<MonitorPoint> selectMonitorsThatNeedToSendOfflineAlarm();

    List<MonitorPoint> selectMonitorsOfflineTimeoutList();


    int insertMonitorOfflineAlarm(List<MonitorPoint> monitorListThatOfflineTimeout);

    int insertMonitorOfflineAlarmForUnitCodes(List<MonitorPoint> monitorListThatOfflineTimeout);

    int updateAlarmStatusAsSent(List<MonitorPoint> monitorListThatOfflineTimeout);

    int updateAlarmStatusAsSentForUnitCodes(List<MonitorPoint> monitorListThatOfflineTimeout);

    int addMonitorAndTreeNodeRel(String monitorId, Integer nodeId);

    int updateOfflineTimeOutMinutes(Integer setMinutes);

    List<MonitorPointVO> selectAllMonitors();

    List<MonitorPointVO> selectAllMonitorsForUnitCodes(MonitorPoint monitorPoint);


    List<GisMonitorsVo> selectAllGisMonitors(GisMonitorsVo gisMonitorsVo);

    List<GisMonitorsVo> gisMonitorsHasCoordinates();

    void updateGisMonitorsCoordinates(GisMonitorsVo gisMonitorsVo);

    List<MonitorPoint> selectMonitorsThatDropLine();

    List<MonitorPoint> selectMonitorsThatDropLineForUnitCodes();

    void recordDropLineMonitorList(List<MonitorPoint> dropLineMonitors);

    void recordDropLineMonitorListForUnitCodes(List<MonitorPoint> dropLineMonitors);

    List<GisMonitors3DVo> gisMonitorsHas3DCoordinates();

    void updateMonitors3DCoordinates(GisMonitors3DVo gisMonitors3DVo);

    List<GisMonitors3DVo> selectAllMonitors3D(GisMonitors3DVo gisMonitors3DVo);

    List<MonitorOfflineAlarmSettingRespVo> selectMonitorsOfflineAlarmSettingTime(MonitorOfflineAlarmSettingRespVo monitorOfflineAlarmSettingRespVo);

    void updateOfflineAlarmSettingTime(MonitorOfflineAlarmSettingResqVo monitorOfflineAlarmSetting);


    List<MonitorPoint> selectAllMonitorPoints2(MonitorPoint monitorPoint);



//    RatioVo countCameraType();
//    int deleteMonitorByApeId(String monitorId);
//    HashMap<String, MonitorPoint> selectAllMonitorMap();
//
//    RatioVo countComplianceRatio();
//    int insertMonitorPoint(MonitorPoint monitor);
//    int insertMonitorOfflineRecord(String monitorId, Date offlineTime);
//    void addMonitorAndPlaceRel(String monitorId, Long standPlaceId);
//    List<CoalMine> selectCoalMines();
//
//    List<MonitorPoint> selectMonitorsInCoalMine(String coalMineName);
//
//    Integer countOnlineMonitorInCoalMine(String coalMineName);
}
